<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>预约挂号</title>
    <link rel="stylesheet" type="text/css" href="css/swiper.min.css" />
	  <link href="css/choose.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="css/aui.css" />
		<link rel="stylesheet" type="text/css" href="css/main.css" />
</head>

<body>
    <div class="site-name">
      <p>北京114预约挂号平台</p>
    </div>
    <div class="submit-title">
      <h4>挂号信息</h4>
    </div>
    <div class="order-item-body">
      <div class="order-item-row">
        <span>就诊日期</span>
        <p id="dates"></p>
      </div>
      <div class="order-item-row">
        <span>就诊医院</span>
        <p>北京医学科学院肿瘤医院</p>
      </div>
      <div class="order-item-row">
        <span>挂号科室</span>
        <p id="keshi"></p>
      </div>
      <div class="order-item-row">
        <span>医生职称</span>
        <p>医师</p>
      </div>
      <div class="order-item-row">
        <span>医生专长</span>
        <p id="zc"></p>
      </div>
      <div class="order-item-row">
        <span>医事服务费</span>
        <p >50元</p>
      </div>
    </div>

    <div class="add-wrapper">
      <div class="add-title">
        <h4>就诊人信息</h4>
      </div>

      <div class="add-list">
        <div class="add-item">
          <div class="add-left">
            <p>*就诊人手机号</p>
          </div>
          <div class="add-right">
            <div class="add-input">
              <p id="jPnum"></p>
            </div>
          </div>
        </div>

<!--        <div class="add-item">-->
<!--          <div class="add-left">-->
<!--            <p>*短信验证码</p>-->
<!--          </div>-->
<!--          <div class="add-right">-->
<!--            <div class="add-input">-->
<!--              <input placeholder="请输入短信验证码"/>-->
<!--              <em>获取验证码</em>-->
<!--            </div>-->
<!--          </div>-->
<!--        </div>-->

      </div>

      <div class="add-title">
        <h4>联系人信息</h4>
      </div>

      <div class="add-list">
        <div class="add-item">
          <div class="add-left">
            <p>*联系人姓名</p>
          </div>
          <div class="add-right">
            <div class="add-input">
              <input placeholder="请输入联系人姓名" id="lname"/>
            </div>
          </div>
        </div>

        <div class="add-item">
          <div class="add-left">
            <p>*联系人证件类型</p>
          </div>
          <div class="add-right">
            <div class="add-input sele-bp-3">
              <input placeholder="点击选择联系人证件类型" id="jttype"/>
            </div>
            <i class="aui-iconfont aui-icon-right"></i>
          </div>
        </div>

        <div class="add-item">
          <div class="add-left">
            <p>*联系人证件号码</p>
          </div>
          <div class="add-right">
            <div class="add-input">
              <input placeholder="请输入联系人证件号码" id="jcpnum"/>
            </div>
          </div>
        </div>

        <div class="add-item">
          <div class="add-left">
            <p>*联系人手机号</p>
          </div>
          <div class="add-right">
            <div class="add-input">
              <input placeholder="请输入联系人手机号" id="jllnum"/>
            </div>
          </div>
        </div>

      </div>

    </div>

    <div class="submit-title">
      <h4>医院预约规则</h4>
    </div>

    <div class="submit-body">
      <p>1、如果您居住或去过辽宁大连等中/高风险地区，请按照北京市防
      疫防控要求，接受新冠排查后再预约就诊，我院对中/高风险地区
      人群进行出入管控。挂号咨询: 010-66939343
      </p>
      <p>2、如果您居住或去过辽宁大连等中/高风险地区，请按照北京市防
      疫防控要求，接受新冠排查后再预约就诊，我院对中/高风险地区
      人群进行出入管控。挂号咨询: 010-66939343
      </p>
      <p>3、如果您居住或去过辽宁大连等中/高风险地区，请按照北京市防
      疫防控要求，接受新冠排查后再预约就诊，我院对中/高风险地区
      人群进行出入管控。挂号咨询: 010-66939343
      </p>
      <p>4、如果您居住或去过辽宁大连等中/高风险地区，请按照北京市防
      疫防控要求，接受新冠排查后再预约就诊，我院对中/高风险地区
      人群进行出入管控。挂号咨询: 010-66939343
      </p>
      <p>5、如果您居住或去过辽宁大连等中/高风险地区，请按照北京市防
      疫防控要求，接受新冠排查后再预约就诊，我院对中/高风险地区
      人群进行出入管控。挂号咨询: 010-66939343
      </p>
      <p>6、如果您居住或去过辽宁大连等中/高风险地区，请按照北京市防
      疫防控要求，接受新冠排查后再预约就诊，我院对中/高风险地区
      人群进行出入管控。挂号咨询: 010-66939343
      </p>

      <div class="login-btn">
        <a id="my_a_2">确认挂号</a>
      </div>
    </div>

</body>
<script src="js/jquery-1.8.3.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="layer/layer.js"></script>
<script>
  function getreq(name) {
    var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
    var r = window.location.search.substr(1).match(reg);
    if (r != null) {
      return decodeURI(r[2]);
    }
    return null;
  }
  var date = getreq("date");
  var keshi = getreq("keshi");
  var zc = getreq("zc");
  var idcard = getreq("idcard");
  var status = getreq("status");
  var mid = getreq("mid");

  $("#dates").html(date);
  $("#keshi").html(keshi);
  $("#zc").html(zc);
  $(function () {
    $.ajax({
      type:"post",
      url:"http://guowang.nat300.top/wechat114/thepatients/selectByidcard",
      data:{"idcard":idcard},
      dataType:"json",
      success:function (data) {
        $("#lname").val(data.data.contactname);
        $("#jttype").val(data.data.contactidtype);
        $("#jllnum").val(data.data.contactphone);
        $("#jcpnum").val(data.data.contactidnum);
        $("#jPnum").html(data.data.mobilenum);
      }
    })
  })
  $("#my_a_2").click(function () {
    $.ajax({
      type:"post",
      url:"http://guowang.nat300.top/wechat114/registered/addRegistered",
      data:{"datetime":date,
        "hospitalsid":"北京医学科学院肿瘤医院",
        "deptid":keshi,
        "speciality":zc,
        "orderprice":50,
        "idnum":$("#jPnum").html(),
        "contactname":$("#lname").val(),
        "contactidtype":$("#jttype").val(),
        "contactidnum":$("#jcpnum").val(),
        "contactphone":$("#jllnum").val(),
        "mid":mid,
        "status1":status
      },
      dataType:"json",
      success:function (data) {
        if (data.code == 0){
          alert("挂号成功")
          location.href = "center.html";
        }else {
          alert("挂号失败")
        }
      }
    })
  })
</script>
</html>
